package b.g.b.h.l;

import b.g.b.h.c;
import b.g.b.h.d;
import b.g.b.h.g;
import b.g.b.h.l.f.a;

/* compiled from: HorizontalWidgetRun */
public class k extends o {
    public static int[] k = new int[2];

    public k(d dVar) {
        super(dVar);
        this.h.e = a.LEFT;
        this.i.e = a.RIGHT;
        this.f = 0;
    }

    /* JADX WARNING: Missing block: B:109:0x028a, code skipped:
            if (r6 != 1) goto L_0x02ec;
     */
    public void a(b.g.b.h.l.d r18) {
        /*
        r17 = this;
        r8 = r17;
        r9 = b.g.b.h.d.a.MATCH_CONSTRAINT;
        r10 = k;
        r0 = r8.j;
        r0 = r0.ordinal();
        r11 = 1;
        r12 = 0;
        r1 = 2;
        r2 = 3;
        if (r0 == r11) goto L_0x0021;
    L_0x0012:
        if (r0 == r1) goto L_0x0021;
    L_0x0014:
        if (r0 == r2) goto L_0x0017;
    L_0x0016:
        goto L_0x0021;
    L_0x0017:
        r0 = r8.b;
        r1 = r0.D;
        r0 = r0.F;
        r8.l(r1, r0, r12);
        return;
    L_0x0021:
        r0 = r8.e;
        r3 = r0.j;
        r13 = 1056964608; // 0x3f000000 float:0.5 double:5.222099017E-315;
        if (r3 != 0) goto L_0x02ec;
    L_0x0029:
        r3 = r8.d;
        if (r3 != r9) goto L_0x02ec;
    L_0x002d:
        r3 = r8.b;
        r4 = r3.l;
        if (r4 == r1) goto L_0x02d4;
    L_0x0033:
        if (r4 == r2) goto L_0x0037;
    L_0x0035:
        goto L_0x02ec;
    L_0x0037:
        r1 = r3.m;
        r4 = -1;
        if (r1 == 0) goto L_0x0070;
    L_0x003c:
        if (r1 != r2) goto L_0x003f;
    L_0x003e:
        goto L_0x0070;
    L_0x003f:
        r1 = r3.T;
        if (r1 == r4) goto L_0x005e;
    L_0x0043:
        if (r1 == 0) goto L_0x0053;
    L_0x0045:
        if (r1 == r11) goto L_0x0049;
    L_0x0047:
        r1 = 0;
        goto L_0x006b;
    L_0x0049:
        r1 = r3.e;
        r1 = r1.e;
        r1 = r1.g;
        r1 = (float) r1;
        r2 = r3.S;
        goto L_0x0067;
    L_0x0053:
        r1 = r3.e;
        r1 = r1.e;
        r1 = r1.g;
        r1 = (float) r1;
        r2 = r3.S;
        r1 = r1 / r2;
        goto L_0x0069;
    L_0x005e:
        r1 = r3.e;
        r1 = r1.e;
        r1 = r1.g;
        r1 = (float) r1;
        r2 = r3.S;
    L_0x0067:
        r1 = r1 * r2;
    L_0x0069:
        r1 = r1 + r13;
        r1 = (int) r1;
    L_0x006b:
        r0.c(r1);
        goto L_0x02ec;
    L_0x0070:
        r0 = r3.e;
        r14 = r0.h;
        r15 = r0.i;
        r0 = r3.D;
        r0 = r0.f;
        if (r0 == 0) goto L_0x007e;
    L_0x007c:
        r0 = 1;
        goto L_0x007f;
    L_0x007e:
        r0 = 0;
    L_0x007f:
        r1 = r3.E;
        r1 = r1.f;
        if (r1 == 0) goto L_0x0087;
    L_0x0085:
        r1 = 1;
        goto L_0x0088;
    L_0x0087:
        r1 = 0;
    L_0x0088:
        r2 = r3.F;
        r2 = r2.f;
        if (r2 == 0) goto L_0x0090;
    L_0x008e:
        r2 = 1;
        goto L_0x0091;
    L_0x0090:
        r2 = 0;
    L_0x0091:
        r5 = r3.G;
        r5 = r5.f;
        if (r5 == 0) goto L_0x0099;
    L_0x0097:
        r5 = 1;
        goto L_0x009a;
    L_0x0099:
        r5 = 0;
    L_0x009a:
        r7 = r3.T;
        if (r0 == 0) goto L_0x01d2;
    L_0x009e:
        if (r1 == 0) goto L_0x01d2;
    L_0x00a0:
        if (r2 == 0) goto L_0x01d2;
    L_0x00a2:
        if (r5 == 0) goto L_0x01d2;
    L_0x00a4:
        r6 = r3.S;
        r0 = r14.j;
        if (r0 == 0) goto L_0x0102;
    L_0x00aa:
        r0 = r15.j;
        if (r0 == 0) goto L_0x0102;
    L_0x00ae:
        r0 = r8.h;
        r1 = r0.c;
        if (r1 == 0) goto L_0x0101;
    L_0x00b4:
        r1 = r8.i;
        r1 = r1.c;
        if (r1 != 0) goto L_0x00bb;
    L_0x00ba:
        goto L_0x0101;
    L_0x00bb:
        r0 = r0.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r0 = r0.g;
        r1 = r8.h;
        r1 = r1.f;
        r2 = r0 + r1;
        r0 = r8.i;
        r0 = r0.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r0 = r0.g;
        r1 = r8.i;
        r1 = r1.f;
        r3 = r0 - r1;
        r0 = r14.g;
        r1 = r14.f;
        r4 = r0 + r1;
        r0 = r15.g;
        r1 = r15.f;
        r5 = r0 - r1;
        r0 = r17;
        r1 = r10;
        r0.m(r1, r2, r3, r4, r5, r6, r7);
        r0 = r8.e;
        r1 = r10[r12];
        r0.c(r1);
        r0 = r8.b;
        r0 = r0.e;
        r0 = r0.e;
        r1 = r10[r11];
        r0.c(r1);
    L_0x0101:
        return;
    L_0x0102:
        r0 = r8.h;
        r1 = r0.j;
        if (r1 == 0) goto L_0x015c;
    L_0x0108:
        r1 = r8.i;
        r2 = r1.j;
        if (r2 == 0) goto L_0x015c;
    L_0x010e:
        r2 = r14.c;
        if (r2 == 0) goto L_0x015b;
    L_0x0112:
        r2 = r15.c;
        if (r2 != 0) goto L_0x0117;
    L_0x0116:
        goto L_0x015b;
    L_0x0117:
        r2 = r0.g;
        r0 = r0.f;
        r2 = r2 + r0;
        r0 = r1.g;
        r1 = r1.f;
        r3 = r0 - r1;
        r0 = r14.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r0 = r0.g;
        r1 = r14.f;
        r4 = r0 + r1;
        r0 = r15.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r0 = r0.g;
        r1 = r15.f;
        r5 = r0 - r1;
        r0 = r17;
        r1 = r10;
        r16 = r6;
        r18 = r7;
        r0.m(r1, r2, r3, r4, r5, r6, r7);
        r0 = r8.e;
        r1 = r10[r12];
        r0.c(r1);
        r0 = r8.b;
        r0 = r0.e;
        r0 = r0.e;
        r1 = r10[r11];
        r0.c(r1);
        goto L_0x0160;
    L_0x015b:
        return;
    L_0x015c:
        r16 = r6;
        r18 = r7;
    L_0x0160:
        r0 = r8.h;
        r1 = r0.c;
        if (r1 == 0) goto L_0x01d1;
    L_0x0166:
        r1 = r8.i;
        r1 = r1.c;
        if (r1 == 0) goto L_0x01d1;
    L_0x016c:
        r1 = r14.c;
        if (r1 == 0) goto L_0x01d1;
    L_0x0170:
        r1 = r15.c;
        if (r1 != 0) goto L_0x0175;
    L_0x0174:
        goto L_0x01d1;
    L_0x0175:
        r0 = r0.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r0 = r0.g;
        r1 = r8.h;
        r1 = r1.f;
        r2 = r0 + r1;
        r0 = r8.i;
        r0 = r0.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r0 = r0.g;
        r1 = r8.i;
        r1 = r1.f;
        r3 = r0 - r1;
        r0 = r14.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r0 = r0.g;
        r1 = r14.f;
        r4 = r0 + r1;
        r0 = r15.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r0 = r0.g;
        r1 = r15.f;
        r5 = r0 - r1;
        r0 = r17;
        r1 = r10;
        r6 = r16;
        r7 = r18;
        r0.m(r1, r2, r3, r4, r5, r6, r7);
        r0 = r8.e;
        r1 = r10[r12];
        r0.c(r1);
        r0 = r8.b;
        r0 = r0.e;
        r0 = r0.e;
        r1 = r10[r11];
        r0.c(r1);
        goto L_0x02ec;
    L_0x01d1:
        return;
    L_0x01d2:
        r18 = r7;
        if (r0 == 0) goto L_0x025b;
    L_0x01d6:
        if (r2 == 0) goto L_0x025b;
    L_0x01d8:
        r0 = r8.h;
        r1 = r0.c;
        if (r1 == 0) goto L_0x025a;
    L_0x01de:
        r1 = r8.i;
        r1 = r1.c;
        if (r1 != 0) goto L_0x01e6;
    L_0x01e4:
        goto L_0x025a;
    L_0x01e6:
        r1 = r3.S;
        r0 = r0.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r0 = r0.g;
        r2 = r8.h;
        r2 = r2.f;
        r0 = r0 + r2;
        r2 = r8.i;
        r2 = r2.l;
        r2 = r2.get(r12);
        r2 = (b.g.b.h.l.f) r2;
        r2 = r2.g;
        r3 = r8.i;
        r3 = r3.f;
        r2 = r2 - r3;
        r6 = r18;
        if (r6 == r4) goto L_0x0236;
    L_0x020c:
        if (r6 == 0) goto L_0x0236;
    L_0x020e:
        if (r6 == r11) goto L_0x0212;
    L_0x0210:
        goto L_0x02ec;
    L_0x0212:
        r2 = r2 - r0;
        r0 = r8.g(r2, r12);
        r2 = (float) r0;
        r2 = r2 / r1;
        r2 = r2 + r13;
        r2 = (int) r2;
        r3 = r8.g(r2, r11);
        if (r2 == r3) goto L_0x0226;
    L_0x0221:
        r0 = (float) r3;
        r0 = r0 * r1;
        r0 = r0 + r13;
        r0 = (int) r0;
    L_0x0226:
        r1 = r8.e;
        r1.c(r0);
        r0 = r8.b;
        r0 = r0.e;
        r0 = r0.e;
        r0.c(r3);
        goto L_0x02ec;
    L_0x0236:
        r2 = r2 - r0;
        r0 = r8.g(r2, r12);
        r2 = (float) r0;
        r2 = r2 * r1;
        r2 = r2 + r13;
        r2 = (int) r2;
        r3 = r8.g(r2, r11);
        if (r2 == r3) goto L_0x024a;
    L_0x0246:
        r0 = (float) r3;
        r0 = r0 / r1;
        r0 = r0 + r13;
        r0 = (int) r0;
    L_0x024a:
        r1 = r8.e;
        r1.c(r0);
        r0 = r8.b;
        r0 = r0.e;
        r0 = r0.e;
        r0.c(r3);
        goto L_0x02ec;
    L_0x025a:
        return;
    L_0x025b:
        r6 = r18;
        if (r1 == 0) goto L_0x02ec;
    L_0x025f:
        if (r5 == 0) goto L_0x02ec;
    L_0x0261:
        r0 = r14.c;
        if (r0 == 0) goto L_0x02d3;
    L_0x0265:
        r0 = r15.c;
        if (r0 != 0) goto L_0x026a;
    L_0x0269:
        goto L_0x02d3;
    L_0x026a:
        r0 = r3.S;
        r1 = r14.l;
        r1 = r1.get(r12);
        r1 = (b.g.b.h.l.f) r1;
        r1 = r1.g;
        r2 = r14.f;
        r1 = r1 + r2;
        r2 = r15.l;
        r2 = r2.get(r12);
        r2 = (b.g.b.h.l.f) r2;
        r2 = r2.g;
        r3 = r15.f;
        r2 = r2 - r3;
        if (r6 == r4) goto L_0x02b0;
    L_0x0288:
        if (r6 == 0) goto L_0x028d;
    L_0x028a:
        if (r6 == r11) goto L_0x02b0;
    L_0x028c:
        goto L_0x02ec;
    L_0x028d:
        r2 = r2 - r1;
        r1 = r8.g(r2, r11);
        r2 = (float) r1;
        r2 = r2 * r0;
        r2 = r2 + r13;
        r2 = (int) r2;
        r3 = r8.g(r2, r12);
        if (r2 == r3) goto L_0x02a1;
    L_0x029d:
        r1 = (float) r3;
        r1 = r1 / r0;
        r1 = r1 + r13;
        r1 = (int) r1;
    L_0x02a1:
        r0 = r8.e;
        r0.c(r3);
        r0 = r8.b;
        r0 = r0.e;
        r0 = r0.e;
        r0.c(r1);
        goto L_0x02ec;
    L_0x02b0:
        r2 = r2 - r1;
        r1 = r8.g(r2, r11);
        r2 = (float) r1;
        r2 = r2 / r0;
        r2 = r2 + r13;
        r2 = (int) r2;
        r3 = r8.g(r2, r12);
        if (r2 == r3) goto L_0x02c4;
    L_0x02bf:
        r1 = (float) r3;
        r1 = r1 * r0;
        r1 = r1 + r13;
        r1 = (int) r1;
    L_0x02c4:
        r0 = r8.e;
        r0.c(r3);
        r0 = r8.b;
        r0 = r0.e;
        r0 = r0.e;
        r0.c(r1);
        goto L_0x02ec;
    L_0x02d3:
        return;
    L_0x02d4:
        r1 = r3.P;
        if (r1 == 0) goto L_0x02ec;
    L_0x02d8:
        r1 = r1.d;
        r1 = r1.e;
        r2 = r1.j;
        if (r2 == 0) goto L_0x02ec;
    L_0x02e0:
        r2 = r3.q;
        r1 = r1.g;
        r1 = (float) r1;
        r1 = r1 * r2;
        r1 = r1 + r13;
        r1 = (int) r1;
        r0.c(r1);
    L_0x02ec:
        r0 = r8.h;
        r1 = r0.c;
        if (r1 == 0) goto L_0x0405;
    L_0x02f2:
        r1 = r8.i;
        r2 = r1.c;
        if (r2 != 0) goto L_0x02fa;
    L_0x02f8:
        goto L_0x0405;
    L_0x02fa:
        r0 = r0.j;
        if (r0 == 0) goto L_0x0309;
    L_0x02fe:
        r0 = r1.j;
        if (r0 == 0) goto L_0x0309;
    L_0x0302:
        r0 = r8.e;
        r0 = r0.j;
        if (r0 == 0) goto L_0x0309;
    L_0x0308:
        return;
    L_0x0309:
        r0 = r8.e;
        r0 = r0.j;
        if (r0 != 0) goto L_0x0351;
    L_0x030f:
        r0 = r8.d;
        if (r0 != r9) goto L_0x0351;
    L_0x0313:
        r0 = r8.b;
        r1 = r0.l;
        if (r1 != 0) goto L_0x0351;
    L_0x0319:
        r0 = r0.w();
        if (r0 != 0) goto L_0x0351;
    L_0x031f:
        r0 = r8.h;
        r0 = r0.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r1 = r8.i;
        r1 = r1.l;
        r1 = r1.get(r12);
        r1 = (b.g.b.h.l.f) r1;
        r0 = r0.g;
        r2 = r8.h;
        r3 = r2.f;
        r0 = r0 + r3;
        r1 = r1.g;
        r3 = r8.i;
        r3 = r3.f;
        r1 = r1 + r3;
        r3 = r1 - r0;
        r2.c(r0);
        r0 = r8.i;
        r0.c(r1);
        r0 = r8.e;
        r0.c(r3);
        return;
    L_0x0351:
        r0 = r8.e;
        r0 = r0.j;
        if (r0 != 0) goto L_0x03b3;
    L_0x0357:
        r0 = r8.d;
        if (r0 != r9) goto L_0x03b3;
    L_0x035b:
        r0 = r8.a;
        if (r0 != r11) goto L_0x03b3;
    L_0x035f:
        r0 = r8.h;
        r0 = r0.l;
        r0 = r0.size();
        if (r0 <= 0) goto L_0x03b3;
    L_0x0369:
        r0 = r8.i;
        r0 = r0.l;
        r0 = r0.size();
        if (r0 <= 0) goto L_0x03b3;
    L_0x0373:
        r0 = r8.h;
        r0 = r0.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r1 = r8.i;
        r1 = r1.l;
        r1 = r1.get(r12);
        r1 = (b.g.b.h.l.f) r1;
        r0 = r0.g;
        r2 = r8.h;
        r2 = r2.f;
        r0 = r0 + r2;
        r1 = r1.g;
        r2 = r8.i;
        r2 = r2.f;
        r1 = r1 + r2;
        r1 = r1 - r0;
        r0 = r8.e;
        r0 = r0.m;
        r0 = java.lang.Math.min(r1, r0);
        r1 = r8.b;
        r2 = r1.p;
        r1 = r1.o;
        r0 = java.lang.Math.max(r1, r0);
        if (r2 <= 0) goto L_0x03ae;
    L_0x03aa:
        r0 = java.lang.Math.min(r2, r0);
    L_0x03ae:
        r1 = r8.e;
        r1.c(r0);
    L_0x03b3:
        r0 = r8.e;
        r0 = r0.j;
        if (r0 != 0) goto L_0x03ba;
    L_0x03b9:
        return;
    L_0x03ba:
        r0 = r8.h;
        r0 = r0.l;
        r0 = r0.get(r12);
        r0 = (b.g.b.h.l.f) r0;
        r1 = r8.i;
        r1 = r1.l;
        r1 = r1.get(r12);
        r1 = (b.g.b.h.l.f) r1;
        r2 = r0.g;
        r3 = r8.h;
        r4 = r3.f;
        r4 = r4 + r2;
        r5 = r1.g;
        r6 = r8.i;
        r6 = r6.f;
        r6 = r6 + r5;
        r7 = r8.b;
        r7 = r7.Z;
        if (r0 != r1) goto L_0x03e5;
    L_0x03e2:
        r7 = 1056964608; // 0x3f000000 float:0.5 double:5.222099017E-315;
        goto L_0x03e7;
    L_0x03e5:
        r2 = r4;
        r5 = r6;
    L_0x03e7:
        r5 = r5 - r2;
        r0 = r8.e;
        r0 = r0.g;
        r5 = r5 - r0;
        r0 = (float) r2;
        r0 = r0 + r13;
        r1 = (float) r5;
        r1 = r1 * r7;
        r1 = r1 + r0;
        r0 = (int) r1;
        r3.c(r0);
        r0 = r8.i;
        r1 = r8.h;
        r1 = r1.g;
        r2 = r8.e;
        r2 = r2.g;
        r1 = r1 + r2;
        r0.c(r1);
    L_0x0405:
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: b.g.b.h.l.k.a(b.g.b.h.l.d):void");
    }

    public void d() {
        f h;
        f fVar;
        int d;
        d dVar;
        d.a aVar = d.a.MATCH_CONSTRAINT;
        d.a aVar2 = d.a.MATCH_PARENT;
        d.a aVar3 = d.a.FIXED;
        d dVar2 = this.b;
        if (dVar2.a) {
            this.e.c(dVar2.r());
        }
        if (!this.e.j) {
            d.a m = this.b.m();
            this.d = m;
            if (m != aVar) {
                if (m == aVar2) {
                    dVar2 = this.b.P;
                    if ((dVar2 != null && dVar2.m() == aVar3) || dVar2.m() == aVar2) {
                        int r = (dVar2.r() - this.b.D.d()) - this.b.F.d();
                        b(this.h, dVar2.d.h, this.b.D.d());
                        b(this.i, dVar2.d.i, -this.b.F.d());
                        this.e.c(r);
                        return;
                    }
                }
                if (this.d == aVar3) {
                    this.e.c(this.b.r());
                }
            }
        } else if (this.d == aVar2) {
            dVar2 = this.b.P;
            if ((dVar2 != null && dVar2.m() == aVar3) || dVar2.m() == aVar2) {
                b(this.h, dVar2.d.h, this.b.D.d());
                b(this.i, dVar2.d.i, -this.b.F.d());
                return;
            }
        }
        g gVar = this.e;
        if (gVar.j) {
            d dVar3 = this.b;
            if (dVar3.a) {
                c[] cVarArr = dVar3.L;
                if (cVarArr[0].f == null || cVarArr[1].f == null) {
                    if (cVarArr[0].f != null) {
                        h = h(cVarArr[0]);
                        if (h != null) {
                            fVar = this.h;
                            d = this.b.L[0].d();
                            fVar.l.add(h);
                            fVar.f = d;
                            h.k.add(fVar);
                            b(this.i, this.h, this.e.g);
                        }
                    } else if (cVarArr[1].f != null) {
                        h = h(cVarArr[1]);
                        if (h != null) {
                            fVar = this.i;
                            d = -this.b.L[1].d();
                            fVar.l.add(h);
                            fVar.f = d;
                            h.k.add(fVar);
                            b(this.h, this.i, -this.e.g);
                        }
                    } else if (!((dVar3 instanceof g) || dVar3.P == null || dVar3.i(c.a.CENTER).f != null)) {
                        dVar = this.b;
                        b(this.h, dVar.P.d.h, dVar.s());
                        b(this.i, this.h, this.e.g);
                    }
                }
                if (dVar3.w()) {
                    this.h.f = this.b.L[0].d();
                    this.i.f = -this.b.L[1].d();
                } else {
                    h = h(this.b.L[0]);
                    if (h != null) {
                        fVar = this.h;
                        d = this.b.L[0].d();
                        fVar.l.add(h);
                        fVar.f = d;
                        h.k.add(fVar);
                    }
                    h = h(this.b.L[1]);
                    if (h != null) {
                        fVar = this.i;
                        d = -this.b.L[1].d();
                        fVar.l.add(h);
                        fVar.f = d;
                        h.k.add(fVar);
                    }
                    this.h.b = true;
                    this.i.b = true;
                }
            }
        }
        if (this.d == aVar) {
            dVar = this.b;
            d = dVar.l;
            g gVar2;
            if (d == 2) {
                dVar = dVar.P;
                if (dVar != null) {
                    gVar2 = dVar.e.e;
                    gVar.l.add(gVar2);
                    gVar2.k.add(this.e);
                    gVar2 = this.e;
                    gVar2.b = true;
                    gVar2.k.add(this.h);
                    this.e.k.add(this.i);
                }
            } else if (d == 3) {
                if (dVar.m == 3) {
                    this.h.a = this;
                    this.i.a = this;
                    m mVar = dVar.e;
                    mVar.h.a = this;
                    mVar.i.a = this;
                    gVar.a = this;
                    if (dVar.x()) {
                        this.e.l.add(this.b.e.e);
                        this.b.e.e.k.add(this.e);
                        m mVar2 = this.b.e;
                        mVar2.e.a = this;
                        this.e.l.add(mVar2.h);
                        this.e.l.add(this.b.e.i);
                        this.b.e.h.k.add(this.e);
                        this.b.e.i.k.add(this.e);
                    } else if (this.b.w()) {
                        this.b.e.e.l.add(this.e);
                        this.e.k.add(this.b.e.e);
                    } else {
                        this.b.e.e.l.add(this.e);
                    }
                } else {
                    gVar2 = dVar.e.e;
                    gVar.l.add(gVar2);
                    gVar2.k.add(this.e);
                    this.b.e.h.k.add(this.e);
                    this.b.e.i.k.add(this.e);
                    gVar2 = this.e;
                    gVar2.b = true;
                    gVar2.k.add(this.h);
                    this.e.k.add(this.i);
                    this.h.l.add(this.e);
                    this.i.l.add(this.e);
                }
            }
        }
        dVar = this.b;
        c[] cVarArr2 = dVar.L;
        if (cVarArr2[0].f == null || cVarArr2[1].f == null) {
            if (cVarArr2[0].f != null) {
                h = h(cVarArr2[0]);
                if (h != null) {
                    fVar = this.h;
                    d = this.b.L[0].d();
                    fVar.l.add(h);
                    fVar.f = d;
                    h.k.add(fVar);
                    c(this.i, this.h, 1, this.e);
                }
            } else if (cVarArr2[1].f != null) {
                h = h(cVarArr2[1]);
                if (h != null) {
                    fVar = this.i;
                    d = -this.b.L[1].d();
                    fVar.l.add(h);
                    fVar.f = d;
                    h.k.add(fVar);
                    c(this.h, this.i, -1, this.e);
                }
            } else if (!(dVar instanceof g)) {
                d dVar4 = dVar.P;
                if (dVar4 != null) {
                    b(this.h, dVar4.d.h, dVar.s());
                    c(this.i, this.h, 1, this.e);
                }
            }
        }
        if (dVar.w()) {
            this.h.f = this.b.L[0].d();
            this.i.f = -this.b.L[1].d();
        } else {
            h = h(this.b.L[0]);
            fVar = h(this.b.L[1]);
            h.k.add(this);
            if (h.j) {
                a(this);
            }
            fVar.k.add(this);
            if (fVar.j) {
                a(this);
            }
            this.j = o.a.CENTER;
        }
    }

    public void e() {
        f fVar = this.h;
        if (fVar.j) {
            this.b.U = fVar.g;
        }
    }

    public void f() {
        this.c = null;
        this.h.b();
        this.i.b();
        this.e.b();
        this.g = false;
    }

    public boolean k() {
        if (this.d != d.a.MATCH_CONSTRAINT || this.b.l == 0) {
            return true;
        }
        return false;
    }

    public final void m(int[] iArr, int i, int i2, int i3, int i4, float f, int i5) {
        i2 -= i;
        i4 -= i3;
        if (i5 == -1) {
            i = (int) ((((float) i4) * f) + 0.5f);
            int i6 = (int) ((((float) i2) / f) + 0.5f);
            if (i <= i2 && i4 <= i4) {
                iArr[0] = i;
                iArr[1] = i4;
            } else if (i2 <= i2 && i6 <= i4) {
                iArr[0] = i2;
                iArr[1] = i6;
            }
        } else if (i5 == 0) {
            iArr[0] = (int) ((((float) i4) * f) + 0.5f);
            iArr[1] = i4;
        } else if (i5 == 1) {
            i = (int) ((((float) i2) * f) + 0.5f);
            iArr[0] = i2;
            iArr[1] = i;
        }
    }

    public void n() {
        this.g = false;
        this.h.b();
        this.h.j = false;
        this.i.b();
        this.i.j = false;
        this.e.j = false;
    }

    public String toString() {
        StringBuilder g = c.b.a.a.a.g("HorizontalRun ");
        g.append(this.b.d0);
        return g.toString();
    }
}
